<?php
/* SVN FILE: $Id: app_model.php 4410 2007-02-02 13:31:21Z phpnut $ */
/**
 * Application model for Cake.
 *
 * This file is application-wide model file. You can put all
 * application-wide model-related methods here.
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
 * Copyright 2005-2007, Cake Software Foundation, Inc.
 *								1785 E. Sahara Avenue, Suite 490-204
 *								Las Vegas, Nevada 89104
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright		Copyright 2005-2007, Cake Software Foundation, Inc.
 * @link				http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
 * @package			cake
 * @subpackage		cake.cake
 * @since			CakePHP(tm) v 0.2.9
 * @version			$Revision: 4410 $
 * @modifiedby		$LastChangedBy: phpnut $
 * @lastmodified	$Date: 2007-02-02 07:31:21 -0600 (Fri, 02 Feb 2007) $
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 * Application model for Cake.
 *
 * This is a placeholder class.
 * Create the same file in app/app_model.php
 * Add your application-wide methods to the class, your models will inherit them.
 *
 * @package		cake
 * @subpackage	cake.cake
 */
class AppModel extends Model{

/*
function correctHABTMdata($return = false) {
    $data = array();

    $data[$this->name] = $this->data[$this->name];

    foreach($this->data as $key => $value) {
        if($key != $this->name) {
            if($key == key($value) && is_array($value)) {
                if(!is_array($this->data[$key][$key])) {
                    $data[$key][$key][0] = $this->data[$key][$key];
                }

                if(count($data[$key][$key]) == 1 && trim($data[$key][$key][0]) == "") {
                    if(count($data[$key]) == 1) {
                        unset($data[$key]);
                    } else {
                        unset($data[$key][$key]);
                    }
                }
            } else {
                $data[$key] = $value;
            }
        }
    }

    if($return) {
        return $data;
    } else {
        $this->data = $data;
        return true;
    }
}


function beforeSave() {
    if($this->hasAndBelongsToMany != array()) {
        $this->correctHABTMdata();
    }
        
    return true;
}

 */

}
?>
